﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Property
{
 


    public interface IPropertyListSupportedBehavior : IPropertyProviderBehavior
    {
        IEnumerable<object> GetSupportedProperty(IPropertyProvider[] allPropertyProviders,
            PropertyRetrivalOptions options = PropertyRetrivalOptions.Default);

    }

    /// <summary>
    /// Used by IPropertyHost.
    /// Determine supported property and return the value of a property from a set of PropertyProviders.
    /// </summary>
    public interface IPropertyGetBehavior : IPropertyProviderBehavior
    {
        Task<PropertyPair[]> GetPropertyAsync(object property, IPropertyProvider[] allPropertyProviders,
            PropertyRetrivalOptions options = PropertyRetrivalOptions.Default);
    }

    /// <summary>
    /// Used by IPropertyHost.
    /// Set a property value for each property providers until one report it's handled.
    /// </summary>
    public interface IPropertySetBehavior : IPropertyProviderBehavior
    {
        Task<bool> SetPropertyAsync(IPropertyProvider[] allPropertyProviders, PropertyPair propertyPair,
             PropertyRetrivalOptions options = PropertyRetrivalOptions.Default);
    }

    //public interface IPropertyCombineActionBehavior : IPropertyProviderBehavior
    //{
    //    PropertyPair CombineAction(PropertyPair first, PropertyPair second,
    //        PropertyRetrivalOptions options = PropertyRetrivalOptions.NotApplied);
    //}
}
